﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCGrid.ascx.cs"
    Inherits="IronOne.SalesOne.SalesOneWeb.UserControls.UCUserGrid" %>
<style type="text/css">
            
    .hiddencol
    {
        display:none;
    }
    .viscol
    {
        display:block;
    }


    




</style>

<script type="text/javascript">

    function CheckOtherIsCheckedByGVID(spanChk) {
        var IsChecked = spanChk.checked;
        if (IsChecked) {
            spanChk.parentElement.parentElement.style.backgroundColor = '#228b22';
            spanChk.parentElement.parentElement.style.color = 'white';
        }

        var CurrentRdbID = spanChk.id;
        var Chk = spanChk;
        Parent = document.getElementById('gvUsers');
        var items = Parent.getElementsByTagName('input');


        for (i = 0; i < items.length; i++) {
            if (items[i].id != CurrentRdbID && items[i].type == "radio") {
                if (items[i].checked) {
                    items[i].checked = false;
                    items[i].parentElement.parentElement.style.backgroundColor = 'white';
                    items[i].parentElement.parentElement.style.color = 'black';
                }
            }
        }
    }

    window.onload = function() {

        var msg = document.getElementById('ctl00_MasterMsg');
        if (msg && msg.innerHTML != '')
            showMessageBlock();
    }


    
</script>

  <link href="../StyleSheets/salesOne_txtstyle.css" rel="stylesheet" type="text/css" />          


<table>
    <tr>
        <td >
            <asp:GridView ID="grdUsers" runat="server" BackColor="#907977" 
                BorderColor="#907977"
                BorderWidth="1px" CellPadding="3" CellSpacing="0" GridLines="Vertical" 
                 ondatabound="grdUsers_DataBound" 
                onrowcreated="grdUsers_RowCreated" 
                OnRowDataBound="grdUsers_RowDataBound"
                onpageindexchanging="grdUsers_PageIndexChanging" BorderStyle="solid" >
                <RowStyle BackColor="#f6f6f6" ForeColor="#4A3C8C" BorderWidth="1px" 
                    BorderColor="#907977" BorderStyle="solid" Height="20px"/>

                <Columns  >
                    <asp:TemplateField HeaderText="Select">
                        <ItemTemplate>
                            <asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack="True" CssClass=" rdbtn"
                                oncheckedchanged="RadioButton1_CheckedChanged" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Select">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkUsers" runat="server" CssClass="chbox"
                                 />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                <HeaderStyle BackColor="#ae5044" Font-Bold="True" ForeColor="#F7F7F7"  />
                <EditRowStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                <AlternatingRowStyle BackColor="#cacbcf" />
            </asp:GridView>
           
        </td>
    </tr>
    </table>
    <table >
    <tr>
        <td style="text-align: left" >
            <table cellpadding="0" cellspacing="0" >
                <tr>
                    <td  >
                        <asp:LinkButton ID="lbtPrev" runat="server" onclick="lbtPrev_Click" 
                            Visible="False">Previous</asp:LinkButton>
                    </td>
                    <td width="10"></td>
                    <td >
            <asp:TextBox ID="txtPageNo" runat="server"  CssClass="txtbox2"
    Visible="False">1</asp:TextBox>
                    </td>
                    <td>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                    
    ControlToValidate="txtPageNo" Display="Dynamic" 
                                                    
    ValidationExpression="^\d+$">*</asp:RegularExpressionValidator>
                                                
        
                    </td>
                    <td width="10"></td>
                    <td   >
            <asp:LinkButton ID="lbtGo" runat="server" OnClientClick="validationSummery();" onclick="lbtGo_Click" Visible="False">Go</asp:LinkButton>
                    </td>
                    <td width="10"></td>
                    <td   >
                        <asp:LinkButton ID="lbtNext" runat="server" onclick="lbtNext_Click" 
                            Visible="False">Next</asp:LinkButton>
        
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>